Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define reusable molecule jobs #311

Merged
merged 1 commit into from
Jan 22, 2020
Merged

Define reusable molecule jobs #311

merged 1 commit into from
Jan 22, 2020

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Jan 15, 2020

These jobs should match ansible- ones but also run with docker
enabled.

They rely on YAML 1.1 merge keys feature,... hoping that it will work.
http://blogs.perl.org/users/tinita/2019/05/reusing-data-with-yaml-anchors-aliases-and-merge-keys.html

Needed-By: ansible/molecule#2486

@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 15, 2020

Zuul encountered a syntax error while parsing its configuration in the
repo ansible/ansible-zuul-jobs on branch master. The error was:

required key not provided @ data['name']

The error appears in the following job stanza:

job: &ansible-tox-linters
parent: tox-linters
nodeset: centos-8-1vcpu

in "ansible/ansible-zuul-jobs/zuul.d/jobs.yaml@master", line 19, column 3

ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 15, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 15, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 15, 2020

Build failed.

@pabelanger
Copy link
Contributor

recheck

@pabelanger
Copy link
Contributor

This was due to centos8.1 release, as a result we've rebuilt our images, and should now have centos8.1 nodes online

@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 15, 2020

Build failed.

@ssbarnea
Copy link
Member Author

recheck

@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 15, 2020

Build succeeded.

@ssbarnea ssbarnea marked this pull request as ready for review January 15, 2020 22:35
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 15, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 15, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 15, 2020

Build succeeded.

ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 15, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 15, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 16, 2020

Zuul encountered a syntax error while parsing its configuration in the
repo ansible/ansible-zuul-jobs on branch master. The error was:

while scanning an alias
in "ansible/ansible-zuul-jobs/zuul.d/jobs.yaml@master", line 610, column 10
expected alphabetic or numeric character, but found '.'
in "ansible/ansible-zuul-jobs/zuul.d/jobs.yaml@master", line 610, column 27

ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 16, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 16, 2020

Build succeeded.

ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 16, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 16, 2020

Build failed.

@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 17, 2020

Build failed.

ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 17, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 17, 2020

Build succeeded.

zuul.d/jobs.yaml Outdated Show resolved Hide resolved
@ssbarnea ssbarnea changed the title Define reusable molecule jobs WIP: Define reusable molecule jobs Jan 18, 2020
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 18, 2020

Zuul encountered a syntax error while parsing its configuration in the
repo ansible/ansible-zuul-jobs on branch master. The error was:

Job ansible-tox-docs not defined

The error appears in the following job stanza:

job:
<<: *_stub_molecule
name: molecule-tox-docs
parent: ansible-tox-docs
vars:
tox_envlist: docs

in "ansible/ansible-zuul-jobs/zuul.d/jobs.yaml@master", line 618, column 3

@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 18, 2020

Build succeeded.

@ssbarnea ssbarnea changed the title WIP: Define reusable molecule jobs Define reusable molecule jobs Jan 18, 2020
Copy link
Contributor

@pabelanger pabelanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this looks good. I did find the anchor magic interesting, and maybe something to experiment with. However, i agree we'd likely need a large block of documentation to fully understand how the merge happens. Which, could make managing it greater over time

Comment on lines +8 to +16
- name: Workaround for yum --nobest with docker-ce
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "8"
become: true
yum:
name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see us link to some sort of upstream issue around this, as we likely should fix this in the install-docker role.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zuul.d/jobs.yaml Show resolved Hide resolved
zuul.d/jobs.yaml Outdated Show resolved Hide resolved
zuul.d/jobs.yaml Show resolved Hide resolved
zuul.d/jobs.yaml Outdated
Comment on lines 620 to 621
vars:
tox_envlist: linters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't belive tox_envlist is needed here? We are just redefining the same values, in all jobs below.

zuul.d/jobs.yaml Outdated
parent: tox-docs
nodeset: centos-8-1vcpu

- job: &_stub_molecule
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving to here, as this is the actual job.

I don't think I want to get into the idea of private / public jobs, while I understand the idea. Until now, with parent / child jobs' we've used the idea of 'base' to indicate a top-level job, where child to parent to.

This is a little different, as we are trying reduce copypasta in job design. While not fully documented, zuul jobs can have multiple parents, so I wonder if that might be something to try here. Let me experiment with something in etherpad, so see if we can review all options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be the zuul way to do this, without using yaml anchors, which means a little more typing, but removes need for private jobs:

https://etherpad.openstack.org/p/ansible-tox-molecule

These jobs should match ansible- ones but also run with docker
enabled.
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 18, 2020

Build succeeded.

ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 18, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jan 22, 2020

Build succeeded (gate pipeline).

@ansible-zuul ansible-zuul bot merged commit 02c8d20 into ansible:master Jan 22, 2020
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 22, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 22, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Jan 22, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
ssbarnea added a commit to ansible/molecule that referenced this pull request Jan 24, 2020
Here we are testing molecule on zuul.ansible.com.

Depends-On: ansible/ansible-zuul-jobs#311
Signed-off-by: Paul Belanger <pabelanger@redhat.com>

Co-authored-by: Paul Belanger <pabelanger@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants